//package com.ming.zhihuWebSpider.spider;
//
//import com.ming.zhihuWebSpider.model.DouyuLolInfo;
//import com.ming.zhihuWebSpider.pipeline.DouyuPipeline;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.stereotype.Component;
//import us.codecraft.webmagic.Site;
//import us.codecraft.webmagic.model.OOSpider;
//
///**
// * 用户基本信息抓取，注解方式爬取
// * 斗鱼
// * @Description TODO
// * @author Ming
// * @date: 2016年1月27日--下午12:11:17
// * modify by xxd
// */
//@Component
//public class DouyuSpider implements Crawl {
//
//	@Autowired
//	private DouyuPipeline douyuPipeline;
//
//	private static final String START_URL = "https://www.douyu.com/g_LOL";
//
//	private Site site = Site
//			.me()
//			.setCycleRetryTimes(5)
//			.setRetryTimes(5)
//			.setSleepTime(1000)
//			.setTimeOut(3 * 60 * 1000)
//			.setUserAgent(
//					"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_2) AppleWebKit/537.31 (KHTML, like Gecko) Chrome/26.0.1410.65 Safari/537.31")
//			.setCharset("UTF-8");
//
//	public void crawl() {
//		OOSpider.create(site, douyuPipeline, DouyuLolInfo.class)
//				.addUrl(START_URL)
//				.thread(1).run();
//	}
//
//	public static void main(String[] args) {
//		applicationContext.getBean(DouyuSpider.class).crawl();
//	}
//}
